#@layout()
<script>
    $("#websitemsg-add").validate({
        rules:{
                "websitemsg.name":{
                    required:true
                },
                "websitemsg.mobile":{
                    required:true
                },
                "websitemsg.email":{
                    required:true
                },
                "websitemsg.company":{
                    required:true
                },
                "websitemsg.content":{
                    required:true
                }
        },
        messages:{

                "websitemsg.name":{
                required:"请输入姓名..."
                },
                "websitemsg.mobile":{
                required:"请输入电话..."
                },
                "websitemsg.email":{
                required:"请输入电子邮箱..."
                },
                "websitemsg.company":{
                required:"请输入单位..."
                },
                "websitemsg.content":{
                required:"请输入内容..."
                }
        },
        onkeyup:false,
        focusCleanup:true,
        success:"valid",
        submitHandler:function(form){
        var config = {
        "url":"/admin/websitemsg/doAdd",
        data:$("#websitemsg-add").serialize(),
        "method":"POST"
        };
        var backendTool = new BackendTool(config);
        backendTool.ajaxRequest();
        }
    });
</script>
#define main()
     <form class="form form-horizontal" id="websitemsg-add">
        #include("websitemsg-form.html")
     </form>
#end